/**
 * 
 */
package com.jeecms.wicool.manager.killBuy.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeecms.common.hibernate3.Updater;
import com.jeecms.common.page.Pagination;
import com.jeecms.wicool.dao.killBuy.KillBuyDao;
import com.jeecms.wicool.entity.killBuy.KillBuy;
import com.jeecms.wicool.manager.killBuy.KillBuyMng;

/**
 * @author spring
 *
 */
@Service
@Transactional
public class KillBuyMngImpl implements KillBuyMng {
	
	@Autowired
	private KillBuyDao killBuyDao;

	@Override
	public KillBuy save(KillBuy bean) {
		return killBuyDao.save(bean);
	}

	@Override
	public KillBuy deleteById(Integer id) {
		return killBuyDao.deleteById(id);
	}

	@Override
	public KillBuy update(KillBuy bean) {
		Updater<KillBuy> updater = new Updater<KillBuy>(bean);
		return killBuyDao.updateByUpdater(updater);
	}

	@Override
	public KillBuy findById(Integer id) {
		return killBuyDao.findById(id);
	}

	@Override
	public Pagination getPage(Integer productId, String startTime,
			String endTime, int pageNo, int pageSize) {
		return killBuyDao.getPage(productId, startTime, endTime, pageNo, pageSize);
	}

}
